<?php

declare(strict_types=1);

namespace App\Model\Admin;

use App\Model\Model;
use App\Traits\Model\Admin\Admin as AdminTraits;
use Hyperf\Database\Model\SoftDeletes;

/**
 * @property int $id 
 * @property string $head_img 头像
 * @property string $nickname 昵称
 * @property string $username 用户名
 * @property string $password 密码
 * @property string $mobile 手机号
 * @property string $email 邮箱
 * @property int $is_admin 是否为超管|["否","是"]
 * @property int $status 状态|{"1":"启用","2":"未启用","3":"冻结"}
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 * @property string $deleted_at 
 */
class Admin extends Model
{
    use AdminTraits, SoftDeletes;

    /**
     * 模块名称
     * @var string
     */
    protected string $modularName = '管理员管理';

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'admin';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['head_img', 'nickname', 'username', 'password', 'mobile', 'email', 'is_admin', 'status'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'is_admin' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
